coloreditor: Don't draw a background on boxes
authorBenjamin Otte <otte@redhat.com>
Fri, 18 Nov 2016 05:19:27 +0000 (06:19 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 18 Nov 2016 05:40:53 +0000 (06:40 +0100)
Boxes know how to draw backgrounds these days.

gtk/gtkcoloreditor.c
gtk/ui/gtkcoloreditor.ui

index ed8f48b7a7ba53378310ac88be44bfd4f65aa51a..07dcfcccae76659e0f4a1ae5347164ae1741918d 100644 (file)
@@ -335,24 +335,6 @@ scaled_adjustment (GtkAdjustment *a,
   return as;
 }
 
-static gboolean
-popup_draw (GtkWidget      *popup,
-            cairo_t        *cr,
-            GtkColorEditor *editor)
-{
-  GtkStyleContext *context;
-  gint width, height;
-
-  context = gtk_widget_get_style_context (popup);
-  width = gtk_widget_get_allocated_width (popup);
-  height = gtk_widget_get_allocated_height (popup);
-
-  gtk_render_background (context, cr, 0, 0, width, height);
-  gtk_render_frame (context, cr, 0, 0, width, height);
-
-  return FALSE;
-}
-
 static void
 gtk_color_editor_init (GtkColorEditor *editor)
 {
@@ -506,7 +488,6 @@ gtk_color_editor_class_init (GtkColorEditorClass *class)
   gtk_widget_class_bind_template_child_private (widget_class, GtkColorEditor, a_adj);
 
   gtk_widget_class_bind_template_callback (widget_class, hsv_changed);
-  gtk_widget_class_bind_template_callback (widget_class, popup_draw);
   gtk_widget_class_bind_template_callback (widget_class, popup_key_press);
   gtk_widget_class_bind_template_callback (widget_class, dismiss_current_popup);
   gtk_widget_class_bind_template_callback (widget_class, get_child_position);
index ecaf9fa8ea8eae86037b5a3f587d085640e94b2b..b36aa3329b203294daab2301e3b919cdcda57031 100644 (file)
       <class name="popover"/>
       <class name="osd"/>
     </style>
-    <signal name="draw" handler="popup_draw" swapped="no"/>
     <child>
       <object class="GtkGrid" id="grid4">
         <property name="visible">1</property>
       <class name="popover"/>
       <class name="osd"/>
     </style>
-    <signal name="draw" handler="popup_draw" swapped="no"/>
     <child>
       <object class="GtkGrid" id="grid3">
         <property name="visible">1</property>
       <class name="popover"/>
       <class name="osd"/>
     </style>
-    <signal name="draw" handler="popup_draw" swapped="no"/>
     <child>
       <object class="GtkGrid" id="grid2">
         <property name="visible">1</property>